<?php  defined('BASEPATH') OR exit('No direct script access allowed');

class Dailypickuppoints_model extends MY_Model {

	protected $_table = 'daily_pickup_points';

	public function delete($id = 0)
	{
		return parent::_delete($id);
	}
	
	public function dailyplan_pickuppoints($dayliplan_id = 0)
	{
		$this->db->select("a.*");
		$this->db->from("daily_pickup_points d");
		$this->db->join('pickup_points_lang a', 'd.pickup_point_id = a.id', 'left');
		$this->db->where('d.daily_plan_id', $dayliplan_id);
		$this->db->where('a.lang', CURRENT_LANGUAGE);
	
		$query = $this->db->get();
		$data = array();
		if($query->num_rows() > 0)
		{
			$data = $query->result();
			$query->free_result();
		}
	
		return $data;
	}
	
}
